package com.bsoft.gol.hcs.specialist.entity;

import javax.persistence.*;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import java.util.Date;
import java.util.Objects;

/**
 * 检验报告常规明细表
 * @author lanyu
 * @date 2021年10月14日 10:06
 */
@Entity
@Table(name = "inspect_report_routine_detail")
@XmlRootElement(name = "TestResult")
public class InspectReportRoutineDetailEntity {
    /**
     * 检验报告常规明细id
     */
    private String inspectReportRoutineDetailId;
    /**
     * 检验报告id
     */
    private String inspectReportId;
    /**
     * 检验项目代码
     */
    private String testId;
    /**
     * 检验项目名称
     */
    private String testName;
    /**
     * 检验定量结果
     */
    private double testResult;
    /**
     * 检验定性结果
     */
    private String resultQualitative;
    /**
     * 检验定量结果计量单位
     */
    private String resultUnit;
    /**
     * 检验结果代码
     */
    private String resultCode;
    /**
     * 参考值范围
     */
    private String referenceRange;
    /**
     * 参考值下限
     */
    private String referenceLow;
    /**
     * 参考值上限
     */
    private String referenceHigh;
    /**
     * 检验结果提示
     */
    private String resultHint;
    /**
     * 仪器编号
     */
    private String instrumentCode;
    /**
     * 仪器名称
     */
    private String instrumentName;
    /**
     * 创建时间
     */
    private Date createTime;
    /**
     * 修改时间
     */
    private Date modifyTime;


    @Id
    @Column(name = "inspect_report_routine_detail_id")
    public String getInspectReportRoutineDetailId() {
        return inspectReportRoutineDetailId;
    }

    public void setInspectReportRoutineDetailId(String inspectReportRoutineDetailId) {
        this.inspectReportRoutineDetailId = inspectReportRoutineDetailId;
    }

    @Basic
    @Column(name = "inspect_report_id")
    public String getInspectReportId() {
        return inspectReportId;
    }

    public void setInspectReportId(String inspectReportId) {
        this.inspectReportId = inspectReportId;
    }

    @Basic
    @Column(name = "test_id")
    @XmlElement(name = "TestId")
    public String getTestId() {
        return testId;
    }

    public void setTestId(String testId) {
        this.testId = testId;
    }

    @Basic
    @Column(name = "test_name")
    @XmlElement(name = "TestName")
    public String getTestName() {
        return testName;
    }

    public void setTestName(String testName) {
        this.testName = testName;
    }

    @Basic
    @Column(name = "test_result")
    @XmlElement(name = "TestResult")
    public double getTestResult() {
        return testResult;
    }

    public void setTestResult(double testResult) {
        this.testResult = testResult;
    }

    @Basic
    @Column(name = "result_qualitative")
    @XmlElement(name = "ResultQualitative")
    public String getResultQualitative() {
        return resultQualitative;
    }

    public void setResultQualitative(String resultQualitative) {
        this.resultQualitative = resultQualitative;
    }

    @Basic
    @Column(name = "result_unit")
    @XmlElement(name = "ResultUnit")
    public String getResultUnit() {
        return resultUnit;
    }

    public void setResultUnit(String resultUnit) {
        this.resultUnit = resultUnit;
    }

    @Basic
    @Column(name = "result_code")
    @XmlElement(name = "ResultCode")
    public String getResultCode() {
        return resultCode;
    }

    public void setResultCode(String resultCode) {
        this.resultCode = resultCode;
    }

    @Basic
    @Column(name = "reference_range")
    @XmlElement(name = "ReferenceRange")
    public String getReferenceRange() {
        return referenceRange;
    }

    public void setReferenceRange(String referenceRange) {
        this.referenceRange = referenceRange;
    }

    @Basic
    @Column(name = "reference_low")
    @XmlElement(name = "ReferenceLow")
    public String getReferenceLow() {
        return referenceLow;
    }

    public void setReferenceLow(String referenceLow) {
        this.referenceLow = referenceLow;
    }

    @Basic
    @Column(name = "reference_high")
    @XmlElement(name = "ReferenceHigh")
    public String getReferenceHigh() {
        return referenceHigh;
    }

    public void setReferenceHigh(String referenceHigh) {
        this.referenceHigh = referenceHigh;
    }

    @Basic
    @Column(name = "result_hint")
    @XmlElement(name = "ResultHint")
    public String getResultHint() {
        return resultHint;
    }

    public void setResultHint(String resultHint) {
        this.resultHint = resultHint;
    }

    @Basic
    @Column(name = "instrument_code")
    @XmlElement(name = "InstrumentCode")
    public String getInstrumentCode() {
        return instrumentCode;
    }

    public void setInstrumentCode(String instrumentCode) {
        this.instrumentCode = instrumentCode;
    }

    @Basic
    @Column(name = "instrument_name")
    @XmlElement(name = "InstrumentName")
    public String getInstrumentName() {
        return instrumentName;
    }

    public void setInstrumentName(String instrumentName) {
        this.instrumentName = instrumentName;
    }

    @Basic
    @Column(name = "create_time")
    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Basic
    @Column(name = "modify_time")
    public Date getModifyTime() {
        return modifyTime;
    }

    public void setModifyTime(Date modifyTime) {
        this.modifyTime = modifyTime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        InspectReportRoutineDetailEntity that = (InspectReportRoutineDetailEntity) o;
        return Objects.equals(inspectReportRoutineDetailId, that.inspectReportRoutineDetailId) && Objects.equals(inspectReportId, that.inspectReportId) && Objects.equals(testId, that.testId) && Objects.equals(testName, that.testName) && Objects.equals(testResult, that.testResult) && Objects.equals(resultQualitative, that.resultQualitative) && Objects.equals(resultUnit, that.resultUnit) && Objects.equals(resultCode, that.resultCode) && Objects.equals(referenceRange, that.referenceRange) && Objects.equals(referenceLow, that.referenceLow) && Objects.equals(referenceHigh, that.referenceHigh) && Objects.equals(resultHint, that.resultHint) && Objects.equals(instrumentCode, that.instrumentCode) && Objects.equals(instrumentName, that.instrumentName) && Objects.equals(createTime, that.createTime) && Objects.equals(modifyTime, that.modifyTime);
    }

    @Override
    public int hashCode() {
        return Objects.hash(inspectReportRoutineDetailId, inspectReportId, testId, testName, testResult, resultQualitative, resultUnit, resultCode, referenceRange, referenceLow, referenceHigh, resultHint, instrumentCode, instrumentName, createTime, modifyTime);
    }
}
